﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div id="sendDiv">
<div style=" float:left;width:80%;">
    <textarea title="ctrl+enter发送" style="width:100%; height:60px" id="message" name="message"></textarea>
</div>
<div style=" float:left">
    <button id="sendBtn" style=" line-height:50px; height:50px; width:100px">发送</button>
</div>
<div style="clear:both;"></div>
</div>
<% Html.RenderPartial("HeaderUc"); %>
<link href="<%=ResolveUrl("~/Content/Logoned.css") %>" rel="stylesheet" type="text/css" />
<script src="<%=ResolveUrl("~/Scripts/jquery.hotkeys-0.7.9.min.js") %>" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#sendDiv").bind('keydown', 'Ctrl+return', function () { $("#sendBtn").click(); });
        $("#sendBtn").click(function () {
            $.post(appRoot + 'Ajax/AddChatMessage', { message: $("#message").val() }, function (data) {
                $("#message").val("");
                parent.$("#mainFrame").attr("src", appRoot + "Interaction/ChatMessage?rd=" + rdTime());
                parent.$("#rightFrame").attr("src", appRoot + "Interaction/ChatOnline?rd=" + rdTime());
            });
        });
    });
</script>

